package com.teacher;

public class Student {
    String name;
    int age;
    String className;
    String hobby;
    public void print(){
        System.out.println("姓名:"+name);
        System.out.println("年龄:"+age);
        System.out.println("班级:"+className);
        System.out.println("爱好:"+hobby);
    }

    public String  buy(double moeny){
        System.out.println("烟买了");
        return "烟";
    }

    public static void main(String[] args) {
        //创建一个对象，保存一个对象
        //创建多个对象，保存多个对象 ？
        Student stu1 = new Student();
        stu1.name = "张三1";
        Student stu2 = new Student();
        stu2.name = "张三2";
        int num =10;
        int[] nums = new int[5];
        Student[] stus = new Student[5];
        stus[0] = stu1;
        stus[1] = stu2;
        System.out.println(stus[0].name);
        //思考 吃货联盟订餐系统中，
        // 有那些对象 对象有那些属性，那些方法
    }
}
